home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / sources / isobuild / README < prev    next >
Encoding:
Text File  |  1992-02-11  |  2.6 KB  |  103 lines

  1.  
  2. This code is still in development and may have bugs!!!
  3. Sorry, but not much documentation yet either (see man page). 
  4.  
  5. Chances are that this code will require modifications to be useful
  6. for your specific needs. There are several '#defines' which are needed
  7. depending on the amount of memory and the size of the data sets you
  8. are using. Also you will almost certainly want to change the output format
  9. to fit the needs of your rendering software.  Hopefully the code is
  10. clear enough that the  changes necessary will be obvious.
  11.  
  12. If you have questions contact: bltierney@lbl.gov
  13.  
  14.  
  15. ---------------------------------
  16. Input data uses the HIPS image format. The input routines in 'file_io.c'
  17. could easily be changed to use your format, or a HIPS header could
  18. be faked by doing the following:
  19.  
  20. original name       # character string, may be blank
  21. sequence name       # character string, may be blank
  22. 20    # frames
  23. date                # character string, may be blank, any format
  24. 20    #rows
  25. 20    #cols
  26. 8     #bits per pixel
  27. 0     # bit packing on/off
  28. 0     # 0 =byte data, 1 = short, 2 = int, 3 = float
  29. sequence history     # character string, may be blank
  30. comment              # character string, may be blank
  31. .                    # period to indicate end of header
  32.  
  33. -----------------------------------------
  34. sample header: 128x128x197 byte data
  35.  
  36. mri data
  37.  
  38. 197
  39.  
  40. 128
  41. 128
  42. 8
  43. 0
  44. 0
  45.  
  46. .
  47.  
  48.  
  49. HIPS is available from: Mike Landy,
  50.             SharpImage Software
  51.                 P.O. Box 373, Prince Street Station,
  52.             New York, NY  10012-0007
  53.             landy@nyu.edu
  54.  
  55. ==============================================================
  56.  
  57. output file format:
  58. Because for large data files, all of the polygons may not
  59. fit in memory.  Therefore polygon output is written in "chunks"
  60. All values are in binary format
  61.  
  62. header (4 integers):
  63.     more flag  : 0 = this is the last chunk, 1 = more chunks to follow
  64.     number of vertices
  65.     number of edges
  66.     normal flag  : vertex normals are included (for gouraud shading)
  67.  
  68. vertex list (floats)
  69.     x,y,z
  70.     x,y,z
  71.     x,y,z
  72.     x,y,z
  73.     x,y,z
  74.     .
  75.     .
  76.     .
  77.  
  78. normal list (floats), only if normal flag = 1
  79.     nx,ny,nz
  80.     nx,ny,nz
  81.     nx,ny,nz
  82.     nx,ny,nz
  83.     .
  84.     .
  85.     .
  86.  
  87. edge list (int)
  88. The edge list values are indices into the vertex list, telling which
  89. vertices make up the corners of the triangles.
  90. All polygons are triangles, so every 3 values in the edge list
  91. describes one triangle.
  92.  
  93. If number of edges = 0, then every 3 vertices in the edge list
  94. is a triangle.
  95.  
  96.  
  97. =======================================================
  98. to view the results of isobuild (using isoview):
  99.     isoview render_host
  100.     triserv -t 0   or  ptserv 
  101.  
  102.  
  103.